<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="utf-8" />
	<title>{weixin:$metaTitle}</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
	<meta name="format-detection" content="telephone=no" />
	<script src="{weixin::$staticFilePath}/js/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="{weixin::$staticFilePath}/js/main.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src='/tpl/Wap/default/js/share.js'></script>
    <script type="text/javascript">
	var title = "{weixin:$name}";
    var desc  = "{weixin:$wxshop.wxshop_desc}";
	var link  = "{weixin::C('site_url')}/index.php?g=Wap&m=Product&a=products&token={weixin:$_GET['token']}";
    var imgUrl = "{weixin::C('link_shop_url')}{weixin:$wxshop.wxshop_logo}";
	var appId= '{weixin:$signPackage["appId"]}';
    var timestamp = '{weixin:$signPackage["timestamp"]}';
    var nonceStr = '{weixin:$signPackage["nonceStr"]}';
    var signature= '{weixin:$signPackage["signature"]}';
	$(function(){ 
  		share(title,desc,link,imgUrl,appId,timestamp,nonceStr,signature);
 	}); 
    </script>
</head>
<body>
   <div style="width:100%; height:auto">
   		<img src="{weixin::C('site_url')}/images/paybg.jpg" width="100%" height="100%">
   </div>
</body>
<script type="text/javascript">

function isweixin(){
    var ua = window.navigator.userAgent.toLowerCase();
    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
       return true;
    }else{
       return false;
    } 
}

$(document).ready(function(){
    if(isweixin()){
	}else{
	  location.href="{weixin::C('site_url')}/{weixin::U('Alipay/pay',array('token'=>$token,'order_sn'=>$order_sn))}";
	  //location.href="https://qr.alipay.com/aex02225ie5vebuarz6jx2a";
	}
})
</script>
</body>
</html>